/* Copyright 2012 Sebastiaan Schalbroeck - schalbroeck@gmail.com

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package nl.shinigami.afvalbak;

public class Placemark {

	private String styleUrl;
	private String description;
	private String coordinates;
	private int latitude;
	private int longitude;

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStyleUrl() {
		return styleUrl;
	}

	public void setStyleUrl(String styleUrl) {
		this.styleUrl = styleUrl;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getCoordinates() {
		return coordinates;
	}

	public void setCoordinates(String coordinates) {
		// Split the string to get the Longitude and Latitude data
		// Subsequently remove the "." to make sure that coordinates are in
		// microdegrees
		this.latitude = Integer.parseInt(coordinates.split(",")[1].replace(".",
				""));
		this.longitude = Integer.parseInt(coordinates.split(",")[0].replace(
				".", ""));
		this.coordinates = coordinates;
	}

	public int getLongitude() {
		return this.longitude;
	}

	public int getLatitude() {
		return this.latitude;
	}

}
